#ifndef ONIGVW_H
#define ONIGVW_H

#include "oniguruma.h"

typedef struct {
	int ngroup_num;
	int *group_num;
	char *name;
} OnigVWNamedGroupNumber;


extern regex_t* 
onig_vw_new(const OnigUChar *pattern, OnigOptionType option, int encIndex, int syntaxIndex, OnigUChar *errorMessage);

extern int 
onig_vw_search(regex_t *reg, const OnigUChar *str, int startPos, OnigRegion *region);

extern OnigVWNamedGroupNumber* 
onig_vw_named_group_numbers(regex_t *reg, OnigRegion *region);

extern int 
onig_vw_enc_mbc_minlen(int encIndex);

extern void 
onig_vw_named_group_number_free(OnigVWNamedGroupNumber *ngn);

extern void 
onig_vw_free(regex_t *reg);

extern OnigRegion* 
onig_vw_region_new(void);

extern void 
onig_vw_region_free(OnigRegion *region, int free_self);

extern int 
onig_vw_number_of_names(regex_t *reg);

extern int 
onig_vw_number_of_captures(regex_t *reg);

extern const char* 
onig_vw_version(void);

extern const char* 
oniguruma_version(void);

extern unsigned long 
onig_vw_register(regex_t *reg);

extern regex_t* 
onig_vw_unregister(unsigned long key);

extern void 
onig_vw_release(unsigned long key);

extern unsigned long 
onig_vw_id_limit(void);

extern void 
onig_vw_reset_id(void);

#endif
